package com.hzcx.app.simplechat.ui.setting;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.hzcx.app.simplechat.R;
import com.hzcx.app.simplechat.base.BaseActivity;
import com.hzcx.app.simplechat.ui.publicui.PublicConfirmDialog;
import com.hzcx.app.simplechat.util.UserInfoUtil;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 聊天管理
 */
public class ChatSettingManagerActivity extends BaseActivity {
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.iv_title_right)
    ImageView ivTitleRight;
    @BindView(R.id.tv_title_right)
    TextView tvTitleRight;
    @BindView(R.id.tv_auto_send_msg)
    TextView tvAutoSendMsg;
    @BindView(R.id.tv_notice)
    TextView tvNotice;
    @BindView(R.id.tv_vip_setting)
    TextView tvVipSetting;
    @BindView(R.id.tv_batch_clear)
    TextView tvBatchClear;

    @Override
    public int getLayout() {
        return R.layout.activity_chat_setting_manager;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {

    }

    @OnClick({R.id.tv_auto_send_msg,R.id.tv_batch_clear,R.id.tv_notice})
    public void viewOnClick(View view){
        switch (view.getId()){
            case R.id.tv_auto_send_msg: // 自动打招呼
                startActivity(new Intent(this, SettingAutoSendMsgActivity.class));
                break;

            case R.id.tv_batch_clear: // 批量清除
                if (UserInfoUtil.getUserIsVip()) {
                    startActivity(new Intent(this, BatchClearActivity.class));
                } else {
                    showConfirmDialog("提示", "此功能为VIP特权功能", "开通会员", new PublicConfirmDialog.OnPublicConfirmClickListener() {
                        @Override
                        public void publicConfirm() {
                            startActivity(new Intent(ChatSettingManagerActivity.this, VipActivity.class));
                        }
                    });
                }
                break;

            case R.id.tv_notice: // 通知设置
                startActivity(new Intent(this, SettingNoticeActivity.class));
                break;
        }
    }

}
